﻿@using SplendidCRM.Ext
@using SplendidCRM.Ext.CCBackendService
@using SplendidCRM.Ext.Helpers

@model System.Data.DataSet


@{
    var formId = Guid.NewGuid();
}

<div id="@formId" class="form-grid">
<div  class="form-header">Result query</div>
<div class="form-section">
@if (Model == null || Model.Tables.Count == 0)
{
                <div> No result found </div>
}
else
{
    <table>
        <thead>
            <tr>
                <td>DateTimeRun</td>
                <td>FileName</td>
                <td>Status</td>
                <td>ErrorMessage</td>
            </tr>    
        </thead>
        <tbody>
            
            @foreach (System.Data.DataRow mm in Model.Tables[0].Rows)
            {
                <tr>
                    <td>@mm["DateTimeRun"]</td>
                    <td>@mm["FileName"]</td>
                    <td>@mm["Status"]</td>
                    <td>@mm["ErrorMessage"]</td>
                </tr>
            }
            
        </tbody>
    </table>
}
</div>    
</div>